/*
  DuinolabDelayBlink
  Speed up or slow down the speed of blinking based on one of the potentiometers
  
  This example code is based on the Arduino Blink example.
 */
#include <Duinolab.h>
#include <Wire.h>

void setup() {
  // Initialize the Duinolab
  Duinolab.Init();
  
  // Connect LED 0 from the Duinolab  
  Duinolab.ConnectToArduino(LED_YELLOW);
  
  // Connect potentiometer 0
  Duinolab.ConnectToArduino(POT_BLACK);
}

void loop() {
  int pauselen = Duinolab.ReadPot(POT_BLACK);
  Duinolab.LEDOn(LED_YELLOW);   // set the LED on
  delay(3 * pauselen);              // wait for a second
  Duinolab.LEDOff(LED_YELLOW);  // set the LED off
  delay(3 * pauselen);              // wait for a second
}
